<%@page import="com.ibm.eg.cvmanager.business.stub.InterviewBusinessImpl"%>
<%@page import="com.ibm.eg.cvmanager.business.interfaces.InterviewBusiness"%>
<%@page import="com.ibm.eg.cvmanager.dto.Interview"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=windows-1256"
    pageEncoding="windows-1256"%>

<%
InterviewBusiness business = new InterviewBusinessImpl();

String[] values = request.getParameterValues("delete");


List<Interview> interviews = (List<Interview>) session.getAttribute("interviews");

if(values != null) {
	for(int i = 0;i < values.length;i++) {		
	 	int index = Integer.parseInt(values[i]);
	 		
	 	Interview interview = interviews.get(index - i);
		business.deleteInterview(interview.getId());
		interviews.remove(index - i);
	}
}
%>

<jsp:include page="listInterviews.jsp"></jsp:include>